<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../resource/img/jquery-1.8.3.js"></script>
    <script>
        //传统的js写法
       $(function () {
           /*  document.getElementById("btn").onclick=function () {
                location.href="../resource/img/6.jpg";
            }*/
           //jq的写法
            $("#btn").click(function () {
            //    运用location
            location.href="../resource/img/6.jpg";
            })
       })


    </script>
</head>
<body>
        <input type="button" value="提交" id="btn">
</body>
</html>